package cn.shyouchi.wuguanjia.android.ui.patrol.statistic.page.forget;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.ui.patrol.statistic.PatrolStatisticEntity;

/**
 * Created by Eenie on 2016/12/29 at 13:39
 * Email: 472279981@qq.com
 * Des:
 */

public class PatrolStatisticForgetAdapter extends BaseQuickAdapter<PatrolStatisticEntity.ResultMessageBean.InfoBean.InspectionBean, BaseViewHolder> {
    public PatrolStatisticForgetAdapter( List<PatrolStatisticEntity.ResultMessageBean.InfoBean.InspectionBean> data) {
        super(R.layout.item_patrol_statistic_forget_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, PatrolStatisticEntity.ResultMessageBean.InfoBean.InspectionBean entity) {
        holder.setText(R.id.tv_item_position, String.valueOf(holder.getAdapterPosition() + 1));
        holder.setText(R.id.tv_patrol_time, String.format("巡检时间：%1s", entity.getTime()));
        holder.setText(R.id.tv_patrol_state, String.format("巡检状态：%1s", entity.getHappening()));
        holder.setText(R.id.tv_patrol_addr, String.format("巡检地点：%1s", entity.getInspectionname()));


    }
}
